/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUI;

import DAO.KetNoi;
import GUI.NVK.frKhaNangCungUng;
import GUI.NVK.frLapBaoCaoHangCanNhap;
import GUI.TOOL.BackupDatabase;
import java.awt.Dimension;
import java.util.Vector;
import javax.swing.JInternalFrame;

/**
 *
 * @author Khoi
 */
public class MainForm extends javax.swing.JFrame {

	/**
	 * Creates new form MainForm
	 */
	/**
	 * Chương trình hiên phân quyền cho 4 loại nhân viên Nhan viên Kho NHân
	 * viên bán hàng Nhân viên giao hàng (từ kho mang ra đưa khác hàng Nhân
	 * viên quản lý
	 */
	public interface ISomeBehaviour {

		void SomeFunction();
	}

	public void dangNhap() {
		khoaTatCa();
		if (Var.NV.getLoaiNV() == 10) {
			moTatCa();
		}
		if (Var.NV.getLoaiNV() == 1) {
			mnNVK.setVisible(true);
			mThayDoiThongTinCaNhan.setVisible(true);
			mLogOut.setVisible(true);
			mLogIn.setVisible(false);

		}
		if (Var.NV.getLoaiNV() == 2) {
			mnNVBH.setVisible(true);
			mThayDoiThongTinCaNhan.setVisible(true);
			mLogOut.setVisible(true);
			mLogIn.setVisible(false);

		}
		if (Var.NV.getLoaiNV() == 3) {
			mnNVGH.setVisible(true);
			mThayDoiThongTinCaNhan.setVisible(true);
			mLogOut.setVisible(true);
			mLogIn.setVisible(false);

		}
		if (Var.NV.getLoaiNV() == 4) {
			mnNVQL.setVisible(true);
			mThayDoiThongTinCaNhan.setVisible(true);
			mLogOut.setVisible(true);
			mLogIn.setVisible(false);
		}
		this.setLocation(700, 30);
//		GUI.NVBH.frLapHoaDon fr = new GUI.NVBH.frLapHoaDon();
//		this.jDesktopPane1.add(fr);
//		fr.setVisible(true);
	}

	public MainForm() {
		initComponents();
		KetNoi.setUrl(KetNoi.docCauHinh());
		dangNhap();

	}

	private void khoaTatCa() {
		mnNVK.setVisible(false);

		mnNVBH.setVisible(false);
		mnNVGH.setVisible(false);
		mnNVQL.setVisible(false);
		mThayDoiThongTinCaNhan.setVisible(false);
		mLogOut.setVisible(false);
	}

	private void moTatCa() {
		mnNVK.setVisible(true);

		mnNVBH.setVisible(true);
		mnNVGH.setVisible(true);
		mnNVQL.setVisible(true);
		mThayDoiThongTinCaNhan.setVisible(true);
		mLogOut.setVisible(true);
	}

	/**
	 * This method is called from within the constructor to initialize the
	 * form. WARNING: Do NOT modify this code. The content of this method is
	 * always regenerated by the Form Editor.
	 */
	@SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jMenuItem1 = new javax.swing.JMenuItem();
        jDesktopPane1 = new javax.swing.JDesktopPane();
        jMenuBar1 = new javax.swing.JMenuBar();
        mnHoSo = new javax.swing.JMenu();
        mLogIn = new javax.swing.JMenuItem();
        mLogOut = new javax.swing.JMenuItem();
        mThayDoiThongTinCaNhan = new javax.swing.JMenuItem();
        mThoat = new javax.swing.JMenuItem();
        mnNVK = new javax.swing.JMenu();
        mKho1 = new javax.swing.JMenuItem();
        mKho2 = new javax.swing.JMenuItem();
        mKho4 = new javax.swing.JMenuItem();
        mKho7 = new javax.swing.JMenuItem();
        mKho6 = new javax.swing.JMenuItem();
        mKho8 = new javax.swing.JMenuItem();
        mKho10 = new javax.swing.JMenuItem();
        mnNVBH = new javax.swing.JMenu();
        mBan1 = new javax.swing.JMenuItem();
        mBan2 = new javax.swing.JMenuItem();
        mBan3 = new javax.swing.JMenuItem();
        mBan5 = new javax.swing.JMenuItem();
        mnNVGH = new javax.swing.JMenu();
        mGiao1 = new javax.swing.JMenuItem();
        mKho3 = new javax.swing.JMenuItem();
        mKho5 = new javax.swing.JMenuItem();
        mKho11 = new javax.swing.JMenuItem();
        mGiao2 = new javax.swing.JMenuItem();
        mnNVQL = new javax.swing.JMenu();
        mQL1 = new javax.swing.JMenuItem();
        mQL2 = new javax.swing.JMenuItem();
        mQL3 = new javax.swing.JMenuItem();
        mQL4 = new javax.swing.JMenuItem();
        mQL5 = new javax.swing.JMenuItem();
        mQL6 = new javax.swing.JMenuItem();
        mQL7 = new javax.swing.JMenuItem();
        mQL8 = new javax.swing.JMenuItem();
        mQL9 = new javax.swing.JMenuItem();
        jMenuQLF29 = new javax.swing.JMenuItem();
        jMenu6 = new javax.swing.JMenu();
        jMenuQLF28 = new javax.swing.JMenuItem();
        jMenuQLF33 = new javax.swing.JMenuItem();
        jMenuQLF27 = new javax.swing.JMenuItem();

        jMenuItem1.setText("jMenuItem1");

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jDesktopPane1.setToolTipText("Quản Lý Bán Hàng");
        getContentPane().add(jDesktopPane1, java.awt.BorderLayout.CENTER);

        mnHoSo.setText("Hồ sơ");

        mLogIn.setText("Login");
        mLogIn.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mLogInActionPerformed(evt);
            }
        });
        mnHoSo.add(mLogIn);

        mLogOut.setText("Logout");
        mLogOut.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mLogOutActionPerformed(evt);
            }
        });
        mnHoSo.add(mLogOut);

        mThayDoiThongTinCaNhan.setText("Thay đổi thông tin cá nhân");
        mThayDoiThongTinCaNhan.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mThayDoiThongTinCaNhanActionPerformed(evt);
            }
        });
        mnHoSo.add(mThayDoiThongTinCaNhan);

        mThoat.setText("Thoát");
        mThoat.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mThoatActionPerformed(evt);
            }
        });
        mnHoSo.add(mThoat);

        jMenuBar1.add(mnHoSo);

        mnNVK.setText("Nhân viên kho");

        mKho1.setText("Khả năng cung ứng");
        mKho1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mKho1ActionPerformed(evt);
            }
        });
        mnNVK.add(mKho1);

        mKho2.setText("Lập báo cáo hàng cần nhập");
        mKho2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mKho2ActionPerformed(evt);
            }
        });
        mnNVK.add(mKho2);

        mKho4.setText("Lập phiếu nhập kho");
        mKho4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mKho4ActionPerformed(evt);
            }
        });
        mnNVK.add(mKho4);

        mKho7.setText("Quản lý loại sản phẩm");
        mKho7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mKho7ActionPerformed(evt);
            }
        });
        mnNVK.add(mKho7);

        mKho6.setText("Quản lý nhà cung cấp");
        mKho6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mKho6ActionPerformed(evt);
            }
        });
        mnNVK.add(mKho6);

        mKho8.setText("Quản lý sản phẩm");
        mKho8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mKho8ActionPerformed(evt);
            }
        });
        mnNVK.add(mKho8);

        mKho10.setText("Xem phiếu nhập kho");
        mKho10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mKho10ActionPerformed(evt);
            }
        });
        mnNVK.add(mKho10);

        jMenuBar1.add(mnNVK);

        mnNVBH.setText("Nhân viên bán hàng");

        mBan1.setText("Cập nhật trạng thái hóa đơn");
        mBan1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mBan1ActionPerformed(evt);
            }
        });
        mnNVBH.add(mBan1);

        mBan2.setText("Lập báo cáo bán hàng trong ngày");
        mBan2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mBan2ActionPerformed(evt);
            }
        });
        mnNVBH.add(mBan2);

        mBan3.setText("Lập hóa đơn");
        mBan3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mBan3ActionPerformed(evt);
            }
        });
        mnNVBH.add(mBan3);

        mBan5.setText("Quản lý khách hàng");
        mBan5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mBan5ActionPerformed(evt);
            }
        });
        mnNVBH.add(mBan5);

        jMenuBar1.add(mnNVBH);

        mnNVGH.setText("Nhân viên giao hàng");

        mGiao1.setText("Cập nhật trạng thái hóa đơn");
        mGiao1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mGiao1ActionPerformed(evt);
            }
        });
        mnNVGH.add(mGiao1);

        mKho3.setText("Lập báo cáo xuất kho");
        mKho3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mKho3ActionPerformed(evt);
            }
        });
        mnNVGH.add(mKho3);

        mKho5.setText("Lập phiếu xuất kho");
        mKho5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mKho5ActionPerformed(evt);
            }
        });
        mnNVGH.add(mKho5);

        mKho11.setText("Xem phiếu xuất kho");
        mKho11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mKho11ActionPerformed(evt);
            }
        });
        mnNVGH.add(mKho11);

        mGiao2.setText("Xem thông tin khách hàng");
        mGiao2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mGiao2ActionPerformed(evt);
            }
        });
        mnNVGH.add(mGiao2);

        jMenuBar1.add(mnNVGH);

        mnNVQL.setText("Nhân viên quản lý");

        mQL1.setText("Lập báo cáo bán hàng trong năm");
        mQL1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mQL1ActionPerformed(evt);
            }
        });
        mnNVQL.add(mQL1);

        mQL2.setText("Lập báo cáo bán hàng trong tháng");
        mQL2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mQL2ActionPerformed(evt);
            }
        });
        mnNVQL.add(mQL2);

        mQL3.setText("Phân loại khách hàng theo sức mua");
        mQL3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mQL3ActionPerformed(evt);
            }
        });
        mnNVQL.add(mQL3);

        mQL4.setText("Quản lý nhân viên");
        mQL4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mQL4ActionPerformed(evt);
            }
        });
        mnNVQL.add(mQL4);

        mQL5.setText("Xem danh sách hóa đơn");
        mQL5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mQL5ActionPerformed(evt);
            }
        });
        mnNVQL.add(mQL5);

        mQL6.setText("Xem danh sách hóa đơn của khách hàng");
        mQL6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mQL6ActionPerformed(evt);
            }
        });
        mnNVQL.add(mQL6);

        mQL7.setText("Xem phiếu nhập kho");
        mQL7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mQL7ActionPerformed(evt);
            }
        });
        mnNVQL.add(mQL7);

        mQL8.setText("Xem phiếu xuất kho");
        mQL8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mQL8ActionPerformed(evt);
            }
        });
        mnNVQL.add(mQL8);

        mQL9.setText("Xem thông tin khách hàng");
        mQL9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                mQL9ActionPerformed(evt);
            }
        });
        mnNVQL.add(mQL9);

        jMenuQLF29.setText("Sao lưu Cơ sở dữ liệu");
        jMenuQLF29.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuQLF29ActionPerformed(evt);
            }
        });
        mnNVQL.add(jMenuQLF29);

        jMenuBar1.add(mnNVQL);

        jMenu6.setText("Giúp đỡ");

        jMenuQLF28.setText("Hướng dẫn sử dụng");
        jMenuQLF28.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuQLF28ActionPerformed(evt);
            }
        });
        jMenu6.add(jMenuQLF28);

        jMenuQLF33.setText("Hướng dẫn sử dụng với CSDL SQL");
        jMenuQLF33.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuQLF33ActionPerformed(evt);
            }
        });
        jMenu6.add(jMenuQLF33);

        jMenuQLF27.setText("Bản quyền");
        jMenuQLF27.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuQLF27ActionPerformed(evt);
            }
        });
        jMenu6.add(jMenuQLF27);

        jMenuBar1.add(jMenu6);

        setJMenuBar(jMenuBar1);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void mKho1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mKho1ActionPerformed

	    frKhaNangCungUng fr = new frKhaNangCungUng();
	    this.jDesktopPane1.add(fr);
	    fr.setVisible(true);

    }//GEN-LAST:event_mKho1ActionPerformed

    private void mKho2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mKho2ActionPerformed
	    frLapBaoCaoHangCanNhap fr = new frLapBaoCaoHangCanNhap();
	    this.jDesktopPane1.add(fr);
	    fr.setVisible(true);

    }//GEN-LAST:event_mKho2ActionPerformed

    private void mLogInActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mLogInActionPerformed
	    Object[] ob = this.jDesktopPane1.getAllFrames();
	    for (Object object : ob) {
		    ((JInternalFrame) object).dispose();
	    }
	    frDangNhap fr = new frDangNhap();
	    this.jDesktopPane1.add(fr);
	    fr.setVisible(true);
    }//GEN-LAST:event_mLogInActionPerformed

    private void mBan1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mBan1ActionPerformed
	    GUI.NVBH.frCapNhatTrangThaiHoaDon fr = new GUI.NVBH.frCapNhatTrangThaiHoaDon();
	    this.jDesktopPane1.add(fr);
	    fr.setVisible(true);

    }//GEN-LAST:event_mBan1ActionPerformed

    private void mBan2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mBan2ActionPerformed
	    GUI.NVBH.frLapBaoCaoBanTrongNgay fr = new GUI.NVBH.frLapBaoCaoBanTrongNgay();

	    this.jDesktopPane1.add(fr);
	    fr.setVisible(true);
    }//GEN-LAST:event_mBan2ActionPerformed
	public JInternalFrame[] getAllFrames() {
		int i, count;
		JInternalFrame[] results;
		Vector vResults = new Vector(10);
		Object next, tmp;

		count = getComponentCount();
		for (i = 0; i < count; i++) {
			next = getComponent(i);
			if (next instanceof JInternalFrame) {
				vResults.addElement(next);
			} else if (next instanceof JInternalFrame.JDesktopIcon) {
				tmp = ((JInternalFrame.JDesktopIcon) next).getInternalFrame();
				if (tmp != null) {
					vResults.addElement(tmp);
				}
			}
		}

		results = new JInternalFrame[vResults.size()];
		vResults.copyInto(results);

		return results;
	}
    private void mLogOutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mLogOutActionPerformed
	    for (JInternalFrame f : this.jDesktopPane1.getAllFrames()) {
		    f.dispose();
	    }
	    khoaTatCa();

	    frDangNhap fr = new frDangNhap();
	    this.jDesktopPane1.add(fr);
	    fr.setVisible(true);
	    mLogIn.setVisible(true);


    }//GEN-LAST:event_mLogOutActionPerformed

       private void mGiao1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mGiao1ActionPerformed
		// TODO add your handling code here:
		GUI.NVGH.frCapNhatTrangThaiHoaDon fr = new GUI.NVGH.frCapNhatTrangThaiHoaDon();
		this.jDesktopPane1.add(fr);
		fr.setVisible(true);
       }//GEN-LAST:event_mGiao1ActionPerformed

       private void mQL1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mQL1ActionPerformed
		// TODO add your handling code here:
		GUI.NVQL.frLapBaoCaoBanHang fr = new GUI.NVQL.frLapBaoCaoBanHang();
		this.jDesktopPane1.add(fr);
		fr.setVisible(true);
       }//GEN-LAST:event_mQL1ActionPerformed

       private void mQL2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mQL2ActionPerformed
		// TODO add your handling code here:
		GUI.NVQL.frLapBaoCaoBanHangTheoThang fr = new GUI.NVQL.frLapBaoCaoBanHangTheoThang();
		this.jDesktopPane1.add(fr);
		fr.setVisible(true);
       }//GEN-LAST:event_mQL2ActionPerformed

       private void jMenuQLF27ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuQLF27ActionPerformed
		// TODO add your handling code here:
		About fr = new About();
		fr.setVisible(true);

       }//GEN-LAST:event_jMenuQLF27ActionPerformed

       private void jMenuQLF28ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuQLF28ActionPerformed
		// TODO add your handling code here:
       }//GEN-LAST:event_jMenuQLF28ActionPerformed

       private void mThayDoiThongTinCaNhanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mThayDoiThongTinCaNhanActionPerformed
		// TODO add your handling code here:


		frThayDoiThongTinCaNhan fr = new frThayDoiThongTinCaNhan();
		this.jDesktopPane1.add(fr);
		fr.setVisible(true);
       }//GEN-LAST:event_mThayDoiThongTinCaNhanActionPerformed

       private void mThoatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mThoatActionPerformed
		// TODO add your handling code here:
		this.dispose();
       }//GEN-LAST:event_mThoatActionPerformed

       private void mKho3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mKho3ActionPerformed
		// TODO add your handling code here:
		GUI.NVGH.frLapBaoCaoXuatKho fr = new GUI.NVGH.frLapBaoCaoXuatKho();
		this.jDesktopPane1.add(fr);
		fr.setVisible(true);

       }//GEN-LAST:event_mKho3ActionPerformed

       private void mKho4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mKho4ActionPerformed
		// TODO add your handling code here:
		GUI.NVK.frLapPhieuNhapKho fr = new GUI.NVK.frLapPhieuNhapKho();
		this.jDesktopPane1.add(fr);
		fr.setVisible(true);
       }//GEN-LAST:event_mKho4ActionPerformed
		private void mKho5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mKho5ActionPerformed
			// TODO add your handling code here:
			GUI.NVGH.frLapPhieuXuatKho fr = new GUI.NVGH.frLapPhieuXuatKho();
			this.jDesktopPane1.add(fr);
			fr.setVisible(true);
       }//GEN-LAST:event_mKho5ActionPerformed
       private void mKho6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mKho6ActionPerformed
		// TODO add your handling code here:
		GUI.NVK.frQuanLyNhaCungCap fr = new GUI.NVK.frQuanLyNhaCungCap();
		this.jDesktopPane1.add(fr);
		fr.setVisible(true);
       }//GEN-LAST:event_mKho6ActionPerformed

       private void mKho7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mKho7ActionPerformed
		// TODO add your handling code here:
		GUI.NVK.frQuanLyLoaiSanPham fr = new GUI.NVK.frQuanLyLoaiSanPham();
		this.jDesktopPane1.add(fr);
		fr.setVisible(true);
       }//GEN-LAST:event_mKho7ActionPerformed

       private void mKho8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mKho8ActionPerformed
		// TODO add your handling code here:
		GUI.NVK.frQuanLySanPham fr = new GUI.NVK.frQuanLySanPham();
		this.jDesktopPane1.add(fr);
		fr.setVisible(true);
       }//GEN-LAST:event_mKho8ActionPerformed

       private void mKho10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mKho10ActionPerformed
		// TODO add your handling code here:
		GUI.NVK.frXemPhieuNhapKho fr = new GUI.NVK.frXemPhieuNhapKho();
		this.jDesktopPane1.add(fr);
		fr.setVisible(true);
       }//GEN-LAST:event_mKho10ActionPerformed

		private void mKho11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mKho11ActionPerformed
			// TODO add your handling code here:
			GUI.NVGH.frXemPhieuXuatKho fr = new GUI.NVGH.frXemPhieuXuatKho();
			this.jDesktopPane1.add(fr);
			fr.setVisible(true);
       }//GEN-LAST:event_mKho11ActionPerformed

       private void mBan3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mBan3ActionPerformed
		// TODO add your handling code here:
		GUI.NVBH.frLapHoaDon fr = new GUI.NVBH.frLapHoaDon();
		this.jDesktopPane1.add(fr);
		fr.setVisible(true);
       }//GEN-LAST:event_mBan3ActionPerformed

       private void mBan5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mBan5ActionPerformed
		// TODO add your handling code here:
		GUI.NVBH.frQuanLyKhachHang fr = new GUI.NVBH.frQuanLyKhachHang();
		this.jDesktopPane1.add(fr);
		fr.setVisible(true);
       }//GEN-LAST:event_mBan5ActionPerformed

       private void mGiao2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mGiao2ActionPerformed
		// TODO add your handling code here:
		GUI.NVGH.frXemThongTinKhachHang fr = new GUI.NVGH.frXemThongTinKhachHang();
		this.jDesktopPane1.add(fr);
		fr.setVisible(true);
       }//GEN-LAST:event_mGiao2ActionPerformed

       private void mQL3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mQL3ActionPerformed
		// TODO add your handling code here:
		GUI.NVQL.frPhanLoaiKhachHangTheoSucMua fr = new GUI.NVQL.frPhanLoaiKhachHangTheoSucMua();
		this.jDesktopPane1.add(fr);
		fr.setVisible(true);
       }//GEN-LAST:event_mQL3ActionPerformed

       private void mQL4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mQL4ActionPerformed
		// TODO add your handling code here:
		GUI.NVQL.frQuanLyNhanVien fr = new GUI.NVQL.frQuanLyNhanVien();
		this.jDesktopPane1.add(fr);
		fr.setVisible(true);
       }//GEN-LAST:event_mQL4ActionPerformed

       private void mQL5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mQL5ActionPerformed
		// TODO add your handling code here:
		GUI.NVQL.frXemDanhSachHoaDon fr = new GUI.NVQL.frXemDanhSachHoaDon();
		this.jDesktopPane1.add(fr);
		fr.setVisible(true);
       }//GEN-LAST:event_mQL5ActionPerformed

       private void mQL6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mQL6ActionPerformed
		// TODO add your handling code here:
		GUI.NVQL.frXemDanhSachHoaDonCuaKhachHang fr = new GUI.NVQL.frXemDanhSachHoaDonCuaKhachHang();
		this.jDesktopPane1.add(fr);
		fr.setVisible(true);
       }//GEN-LAST:event_mQL6ActionPerformed

       private void mQL7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mQL7ActionPerformed
		// TODO add your handling code here:
		GUI.NVQL.frXemPhieuNhapKho fr = new GUI.NVQL.frXemPhieuNhapKho();
		this.jDesktopPane1.add(fr);
		fr.setVisible(true);
       }//GEN-LAST:event_mQL7ActionPerformed

       private void mQL8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mQL8ActionPerformed
		// TODO add your handling code here:
		GUI.NVQL.frXemPhieuXuatKho fr = new GUI.NVQL.frXemPhieuXuatKho();
		this.jDesktopPane1.add(fr);
		fr.setVisible(true);
       }//GEN-LAST:event_mQL8ActionPerformed

       private void mQL9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mQL9ActionPerformed
		// TODO add your handling code here:
		GUI.NVQL.frXemThongTinKhachHang fr = new GUI.NVQL.frXemThongTinKhachHang();
		this.jDesktopPane1.add(fr);
		fr.setVisible(true);
       }//GEN-LAST:event_mQL9ActionPerformed

       private void jMenuQLF33ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuQLF33ActionPerformed
		// TODO add your handling code here:
       }//GEN-LAST:event_jMenuQLF33ActionPerformed

       private void jMenuQLF29ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuQLF29ActionPerformed
              // TODO add your handling code here:
		BackupDatabase fr = new BackupDatabase();
		fr.setVisible(true);
       }//GEN-LAST:event_jMenuQLF29ActionPerformed

	/**
	 * @param args the command line arguments
	 */
	public static void main(String args[]) {
		/* Set the Nimbus look and feel */
		//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
		 * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
		 */
		try {
			for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
				if ("Nimbus".equals(info.getName())) {
					javax.swing.UIManager.setLookAndFeel(info.getClassName());
					break;
				}
			}
		} catch (ClassNotFoundException ex) {
			java.util.logging.Logger.getLogger(MainForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
		} catch (InstantiationException ex) {
			java.util.logging.Logger.getLogger(MainForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
		} catch (IllegalAccessException ex) {
			java.util.logging.Logger.getLogger(MainForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
		} catch (javax.swing.UnsupportedLookAndFeelException ex) {
			java.util.logging.Logger.getLogger(MainForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
		}
		//</editor-fold>

		/* Create and display the form */
		java.awt.EventQueue.invokeLater(new Runnable() {
			public void run() {
				MainForm mh = new MainForm();
				mh.setSize(new Dimension(690, 800));
				mh.setVisible(true);
			}
		});
	}
    // Variables declaration - do not modify//GEN-BEGIN:variables
    public static javax.swing.JDesktopPane jDesktopPane1;
    private javax.swing.JMenu jMenu6;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuQLF27;
    private javax.swing.JMenuItem jMenuQLF28;
    private javax.swing.JMenuItem jMenuQLF29;
    private javax.swing.JMenuItem jMenuQLF33;
    private javax.swing.JMenuItem mBan1;
    private javax.swing.JMenuItem mBan2;
    private javax.swing.JMenuItem mBan3;
    private javax.swing.JMenuItem mBan5;
    private javax.swing.JMenuItem mGiao1;
    private javax.swing.JMenuItem mGiao2;
    private javax.swing.JMenuItem mKho1;
    private javax.swing.JMenuItem mKho10;
    private javax.swing.JMenuItem mKho11;
    private javax.swing.JMenuItem mKho2;
    private javax.swing.JMenuItem mKho3;
    private javax.swing.JMenuItem mKho4;
    private javax.swing.JMenuItem mKho5;
    private javax.swing.JMenuItem mKho6;
    private javax.swing.JMenuItem mKho7;
    private javax.swing.JMenuItem mKho8;
    public static javax.swing.JMenuItem mLogIn;
    public static javax.swing.JMenuItem mLogOut;
    private javax.swing.JMenuItem mQL1;
    private javax.swing.JMenuItem mQL2;
    private javax.swing.JMenuItem mQL3;
    private javax.swing.JMenuItem mQL4;
    private javax.swing.JMenuItem mQL5;
    private javax.swing.JMenuItem mQL6;
    private javax.swing.JMenuItem mQL7;
    private javax.swing.JMenuItem mQL8;
    private javax.swing.JMenuItem mQL9;
    public static javax.swing.JMenuItem mThayDoiThongTinCaNhan;
    private javax.swing.JMenuItem mThoat;
    private javax.swing.JMenu mnHoSo;
    public static javax.swing.JMenu mnNVBH;
    public static javax.swing.JMenu mnNVGH;
    public static javax.swing.JMenu mnNVK;
    public static javax.swing.JMenu mnNVQL;
    // End of variables declaration//GEN-END:variables
}
